<button>Test</button>

<script type="module">
let start
let lastTouchTimestamp = 0
const button = document.querySelector('button')
button.addEventListener('touchstart', () => {
  start = +new Date
  lastTouchTimestamp = start
})

button.addEventListener('mouseover', () => {
  if ((+new Date - lastTouchTimestamp) > 1000) {
    start = +new Date
  }
})

button.addEventListener('click', () => {
  button.innerText = '>>> ' + (+new Date - start) + ' <<<'
  start = undefined
})
</script>
<script type="module">
const form = document.forms[0]
form.addEventListener('submit', (e) => {
  e.preventDefault()
  const cookieValue = [
    form.aqsael.checked ? 1 : 0,
    form.sleep.value,
    form.cacheAge.value,
    form.whitelist.checked ? 1 : 0,
    form.intensity.value,
    form.minified.checked ? 1 : 0,
  ].join(',')
  document.cookie = `instantpage_test=${cookieValue}`
  location.reload()
})
</script>
<script src="/instantpage.js" type="module" integrity="sha384-__HASH__"></script>
